package com.yanqu.road.entity.player;

import com.yanqu.road.utils.string.StringUtils;

import java.util.ArrayList;
import java.util.List;

public class ReturnData {
    int ret;
    List<String> params = new ArrayList<>();

    public ReturnData(int ret) {
        this.ret = ret;
    }

    public ReturnData(int ret, String... params) {
        this.ret = ret;
        for (int i = 0; i < params.length; i++) {
            this.params.add(params[i]);
        }
    }

    public void addParam(String param) {
        if (StringUtils.isNullOrEmpty(param)) {
            return;
        }
        params.add(param);
    }

    public int getRet() {
        return ret;
    }

    public void setRet(int ret) {
        this.ret = ret;
    }

    public List<String> getParams() {
        return params;
    }

    public void setParams(List<String> params) {
        this.params = params;
    }
}
